﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace VoluntariadoWindows8Backend
{
    public class VoluntariadoW8Main
    {
        private ServiceHost _clientService;

        public bool Stop()
        {
            try
            {
                _clientService.Close();
                return true;
            }
            catch (Exception)
            {
                throw;
            }
        }

        public bool Start()
        {
            try
            {
                _clientService = new ServiceHost(typeof(VoluntariadoW8ClientService));
                _clientService.Open();
                return true;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
